# -*- encoding: utf-8 -*-


import mod.server.extraServerApi as serverApi
import lobbyGame.netgameApi as lobbyGameApi
from .constants import *


ServerSystem = serverApi.GetServerSystemCls()
CompFactory = serverApi.GetEngineCompFactory()


class T31MainLobbyServerSystem(ServerSystem):
    def __init__(self, namespace, systemName):
        super(T31MainLobbyServerSystem, self).__init__(namespace, systemName)
        lobbyGameApi.SetCityMode(True)
        self.ListenForEvent("Minecraft", "Engine", "AddEntityServerEvent", self, self.AddEntityServerEvent)

    def AddEntityServerEvent(self, args):
        entityId = args['id']
        engineTypeStr = args['engineTypeStr']
        if engineTypeStr == "minecraft:slime":
            self.DestroyEntity(entityId)
















